import unittest
from config import BASE_DIR
from api.login_api import LoginApi
from common.init_log import init_log_config
from common.read_json_data import build_data
from common.verify_assert_login import verify_login_assert
from parameterized import parameterized
class TestLogin(unittest.TestCase):
    @parameterized.expand(build_data(BASE_DIR+'/data/login.json'))
    def test_login(self,case_name,body,expect_result):
        login_obj = LoginApi()
        response = login_obj.login(body)
        json_data = response.json()
        print(json_data)
        verify_login_assert(self,expect_result,response)